home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / infoserv / gopher / Unix / xvgopher / v0.5beta / xvgopher.shar.01.Z / xvgopher.shar.01 / Makefile < prev    next >
Encoding:
Makefile  |  1993-03-25  |  3.6 KB  |  165 lines

  1. #
  2. # Makefile for xvgopher.
  3. #
  4. # (c) Copyright 1993, San Diego State University -- College of Sciences
  5. #       (See the COPYRIGHT file for more Copyright information)
  6. #
  7. # This makefile will work on standard Sun4 systems running SunOS 4.1.X
  8. # and which have the Sun C++ compiler installed in /usr/lang
  9. # If your configuration differs, you will have to modify the rest of this
  10. # file.
  11. #
  12. # The directory the executable should be installed in
  13. BINDIR    =    /usr/local/bin
  14.  
  15. #
  16. # The directory where the man page should go
  17. MANDIR    =    /usr/local/man
  18.  
  19. #
  20. # The section to use for the man page.
  21. MANSECT    =    l
  22.  
  23. #
  24. # Compiler to use.  It has been tested with Sun C++ 2.0, g++ 2.3.3, and
  25. # Sun C++ 3.0
  26. #CCC    =    CC
  27. #CCC    =    g++ -fno-strict-prototypes -w
  28. CCC    =    /usr/local/lang/CC
  29.  
  30. #
  31. # Flags for the compiler.  We use openwin for our X development, but
  32. # the standard x11r5/xview3 will work just fine.
  33. #
  34. CCFLAGS    =    -I$(OPENWINHOME)/include -O
  35.  
  36. #
  37. # I specified the openwin libraries specifically to get around some
  38. # problems with people not mounting our x11r5 tree.  Using this overrides
  39. # the LD_LIBRARY_PATH environment and makes the shared version work on
  40. # all machines with openwin3
  41. #
  42. LDFLAGS    =    -g -L/usr/openwin/lib
  43.  
  44. #
  45. # The makedepend looks in the 'standard' places for system include files.
  46. # Well, Sun decided they weren't going to use the 'standard' places for
  47. # their compilers, so we have to specifiy the actual path...  (Bogus!!!)
  48. #
  49. SYS_INCLUDES =    -I/usr/lang/SC1.0/include/CC
  50. #SYS_INCLUDES =    -I/usr/local/gnu/lib/g++-include -I/usr/local/gnu/lib/gcc-lib/sparc-sun-sunos4.1.2/2.3.3/include
  51.  
  52. #
  53. # Strangely enough xvgopher uses xview!!!
  54. #
  55. LIBS    =    -lxview -lolgx -lX11
  56.  
  57. #
  58. # All the files which will end up with an object file.  (Can't just say
  59. # all source files, because in C++ the headers can contain all kinds of
  60. # source as well...)
  61. #
  62. SRCS    =    \
  63.         Connection.cc \
  64.         GWAbout.cc \
  65.         GWBinary.cc \
  66.         GWBookmarks.cc \
  67.         GWDirectory.cc \
  68.         GWDownload.cc \
  69.         GWFile.cc \
  70.         GWGopher.cc \
  71.         GWImage.cc \
  72.         GWIndex.cc \
  73.         GWInfo.cc \
  74.         GWList.cc \
  75.         GWPref.cc \
  76.         GWSound.cc \
  77.         GWTelnet.cc \
  78.         GWindow.cc \
  79.         Gopher.cc \
  80.         List.cc \
  81.         Preferences.cc \
  82.         Response.cc \
  83.         cursor.cc \
  84.         icons.cc \
  85.         main.cc
  86.  
  87. #
  88. # I am lazy.  I hate typing in lists into makefiles!  I think the word
  89. # replacement macro in makefiles is the best thing since sliced cheese!
  90. #
  91. OBJS    =    $(SRCS:%.cc=%.o)
  92.  
  93. #
  94. # The list of files to put in the shar archive
  95. #
  96. SHARFILES =    \
  97.         README \
  98.         COPYRIGHT \
  99.         BUGS \
  100.         TODO \
  101.         Makefile \
  102.         xvgopher.man \
  103.         $(SRCS) \
  104.         *.h \
  105.         icons/*
  106.  
  107. TARGET    =    xvgopher
  108.  
  109. all:        $(TARGET)
  110.  
  111. $(TARGET):    $(OBJS)
  112.     $(CCC) $(LDFLAGS) -o $(TARGET) $(OBJS) $(LIBS)
  113.  
  114. static:        $(OBJS)
  115.     $(CCC) $(LDFLAGS) -o $(TARGET).static $(OBJS) -Bstatic $(LIBS)
  116.  
  117. clean:
  118.     rm -f $(OBJS) $(TARGET) *.bak *.BAK
  119.  
  120. #
  121. # The installation of the program.
  122. #
  123. install: $(TARGET)
  124.     install -s $(TARGET) $(BINDIR)
  125.     install xvgopher.man $(MANDIR)/man$(MANSECT)/xvgopher.$(MANSECT)
  126.  
  127. #
  128. # I use makedepend.  If you don't have it, get it!
  129. #
  130. depend:
  131.     makedepend -- $(CCFLAGS) $(SYS_INCLUDES) -- $(SRCS)
  132.  
  133. #
  134. # Create a shar file suitable for posting
  135. #
  136. shar:
  137.     shar -c -o xvgopher.shar -l55 $(SHARFILES)
  138.  
  139. #
  140. # Create some tar files suitable for ftping.
  141. #
  142. tar:
  143.     gnutar czvf xvgopher.tar.z $(SHARFILES)
  144.     gnutar cZvf xvgopher.tar.Z $(SHARFILES)
  145.  
  146. zeus:
  147.     gnutar czvf /tmp/xvg.tar.Z *.cc *.h Makefile icons/*
  148.     rcp /tmp/xvg.tar.Z zeus:
  149.     rm /tmp/xvg.tar.Z
  150.  
  151. kiwi:
  152.     gnutar czvf /tmp/xvg.tar.Z *.cc *.h Makefile icons/*
  153.     rcp /tmp/xvg.tar.Z kiwi:
  154.     rm /tmp/xvg.tar.Z
  155.  
  156. rohan:
  157.     gnutar czvf /tmp/xvg.tar.Z *.cc *.h Makefile icons/*
  158.     rcp /tmp/xvg.tar.Z rohan:
  159.     rm /tmp/xvg.tar.Z
  160.  
  161. saturn:
  162.     gnutar czvf /tmp/xvg.tar.Z *.cc *.h Makefile icons/*
  163.     rcp /tmp/xvg.tar.Z saturn:
  164.     rm /tmp/xvg.tar.Z
  165.